<?php

namespace Phalcon;

class Security implements \Phalcon\Di\InjectionAwareInterface
{

    protected $_dependencyInjector;


    protected $_workFactor = 8;


    protected $_numberBytes = 16;


    protected $_csrf;


    /**
     * @param mixed $workFactor 
     */
	public function setWorkFactor($workFactor) {}


	public function getWorkFactor() {}

    /**
     * Sets the dependency injector
     *
     * @param mixed $dependencyInjector 
     */
	public function setDI(\Phalcon\DiInterface $dependencyInjector) {}

    /**
     * Returns the internal dependency injector
     *
     * @return \Phalcon\DiInterface 
     */
	public function getDI() {}

    /**
     * Sets a number of bytes to be generated by the openssl pseudo random generator
     *
     * @param long $randomBytes 
     */
	public function setRandomBytes($randomBytes) {}

    /**
     * Returns a number of bytes to be generated by the openssl pseudo random generator
     *
     * @return string 
     */
	public function getRandomBytes() {}

    /**
     * Generate a >22-length pseudo random string to be used as salt for passwords
     *
     * @return string 
     */
	public function getSaltBytes() {}

    /**
     * Creates a password hash using bcrypt with a pseudo random salt
     *
     * @param string $password 
     * @param int $workFactor 
     * @return string 
     */
	public function hash($password, $workFactor = 0) {}

    /**
     * Checks a plain text password and its hash version to check if the password matches
     *
     * @param string $password 
     * @param string $passwordHash 
     * @param int $maxPassLength 
     * @return bool 
     */
	public function checkHash($password, $passwordHash, $maxPassLength = 0) {}

    /**
     * Checks if a password hash is a valid bcrypt's hash
     *
     * @param string $password 
     * @param string $passwordHash 
     * @return bool 
     */
	public function isLegacyHash($password, $passwordHash) {}

    /**
     * Generates a pseudo random token key to be used as input's name in a CSRF check
     *
     * @param int $numberBytes 
     * @return string 
     */
	public function getTokenKey($numberBytes = null) {}

    /**
     * Generates a pseudo random token value to be used as input's value in a CSRF check
     *
     * @param int $numberBytes 
     * @return string 
     */
	public function getToken($numberBytes = null) {}

    /**
     * Check if the CSRF token sent in the request is the same that the current in session
     *
     * @param string $tokenKey 
     * @param string $tokenValue 
     * @return boolean 
     */
	public function checkToken($tokenKey = null, $tokenValue = null) {}

    /**
     * Returns the value of the CSRF token in session
     *
     * @return string 
     */
	public function getSessionToken() {}

    /**
     * Computes a HMAC
     *
     * @param string $data 
     * @param string $key 
     * @param string $algo 
     * @param boolean $raw 
     */
	public function computeHmac($data, $key, $algo, $raw = false) {}

}
